This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Close the Workflow Process

Hrishikesh - Thursday, March 3, 2011 7:22 AM:

 

hello all,

           When i Close the Workflow Process from an Activity Method, the Error Occurs as " The Workflow Process Should be in Active State " But the Workflow Process is in Active State.

I am checking the two Activity are in Active State then only the Workflow Process should be Closed.

If Activity1 State is in Active and Other is Activity2 State is Pending but i am making Activity2 State  to Active from Coding.

i tried as follow,

  // Item of Workflow Process

wfProc.closeWorkflow();

or

wfProc.setAttribute("action","edit");
wfProc.setProperty("state","Closed");
wfProc.setProperty("current_state",clsdStatId);
wfProc.setProperty("closed_date",curDate);
Item wrkFlowProcess = wfProc.apply();

or

wfProc.setAttribute("action","PromoteItem");

wfProc.setProperty("state","Closed");

Item wrkFlowProcess = wfProc.apply();

 

For all above option i tried but the Error was same " The Workflow Process Should be in Active State "

so please help as early as possible.

Thank you all.

Hrishikesh